//TypeScript-数组类型
export {}; //使用模块,确保跟其它示例没有成员冲突
const arr1: Array<number> = [1, 2, 3, 4, 5, 6];
const arr2: number[] = [1, 2, 3, 4, 5, 6];

//小案例
function sum(...args: number[]) {
  return args.reduce((prev, current) => prev + current);
}
